package com.test.array;

public class TraversalArray02 {
    public static void main(String[] args) {
        String[] cities = {"北京","上海","广州","深圳"};

        for(int i=0;i<cities.length;i++){
            System.out.println(cities[i]);
        }

        //for-each只用于简单的读取数组中的内容
        for (String city:cities){
            System.out.println(city);
        }
    }
}
